<?php
/**
 * Model dla klasy Setting
 *
 * @author ModGen
 */

class Setting extends DataObject{


	/**
	 * nazwa tabeli
	 */
	static $tableName = 'setting';

	/**
	 * nazwa klucza tabeli
	 */
	static $classTablePK = 'id_setting';

	/**
	 * nazwa klasy
	 */
	static $className = __CLASS__;

	/**
	 * tablica mapująca pola klasy
	 */
	static $fields = array(
		'id_setting' => 'id',
		'status' => 'status',
		'date_insert' => 'dateInsert',
		'date_update' => 'dateUpdate',
		'name' => 'name',
		'description' => 'description',
		'weight' => 'weight'
	);


	protected $id;
	private $status;
	private $dateInsert;
	private $dateUpdate;
	private $name;
	private $description;
	private $weight;

	// -- Values
	public $values;
	public function setValues($values) {
	   $this->values = $values;
	}
	public function getValues() {
	    return $this->values;
	}
	public function addValue($value) {
	    if(is_null($this->values)) $this->values = array();
	    $this->values[] = $value;
	}


	// -- Konstruktor --


	function __construct( $id = -1 , $status = null, $dateInsert = null, $dateUpdate = null, $name = null, $description = null, $weight = null){
		$this->id = $id;
		$this->status = $status;
		$this->dateInsert = $dateInsert;
		$this->dateUpdate = $dateUpdate;
		$this->name = $name;
		$this->description = $description;
		$this->weight = $weight;
	}



	// -- Get-y i Set-y --

	public function getId(){
		return $this->id;
	}

	public function setId($id){
		$this->id = $id;
	}

	
	public function getStatus(){
		return $this->status;
	}

	public function setStatus($status){
		$this->status = $status;
	}

	
	public function getDateInsert(){
		return $this->dateInsert;
	}

	public function setDateInsert($dateInsert){
		$this->dateInsert = $dateInsert;
	}

	
	public function getDateUpdate(){
		return $this->dateUpdate;
	}

	public function setDateUpdate($dateUpdate){
		$this->dateUpdate = $dateUpdate;
	}

	
	public function getName(){
		return $this->name;
	}

	public function setName($name){
		$this->name = $name;
	}

	
	public function getDescription(){
		return $this->description;
	}

	public function setDescription($description){
		$this->description = $description;
	}

	
	public function getWeight(){
		return $this->weight;
	}

	public function setWeight($weight){
		$this->weight = $weight;
	}

	




	/**
	* Pobiera nazwę tabeli reprezentującej obiekt w SQL
	* @return string
	*/
	public  function GetTableName(){
	return self::$tableName;
	}

	/**
	* Pobiera nazwę klucza głównego tabeli
	* @return string
	*/
	public function GetClassTablePK() {
		return self::$classTablePK;
	}

	/**
	* Pobiera tablice mapującą pola klasy na pola tabeli
	* @return array
	*/
	public  function GetFields(){
		return self::$fields;
	}

	/**
	* Pobiera nazwę klasy
	* @return string
	*/
	public  function GetClassName(){
		return self::$className;
	}



}

?>